package controllers

import (
	"example.com/m/v2/model"
	"github.com/gin-gonic/gin"
	"net/http"
)

type EquipmentController struct {
}

// Create
// @Summary 添加一台设备
// @Description 添加一台设备信息
// @Tags equipment
// @Accept json
// @Produce json
// @Param EquipmentModel body model.EquipmentModel true "Equipment Info"
// @Success 200 {object} model.EquipmentModel "ok"
// @Failure 400 {string} string "bad request"
// @Failure 500 {string} string "Internal Server Error"
// @Router /equipment [post]
func (c *EquipmentController) Create(ctx *gin.Context) {
	var equipment model.EquipmentModel
	_ = ctx.ShouldBind(&equipment)

	ctx.JSON(http.StatusOK, gin.H{
		"code": 200,
		"data": equipment,
	})
}
